package com.akcome.apollo.domain;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;

/**
 * 用户信息
 *
 * @author wn
 * @version $v: 1.0.0, $time:2017-12-26 08:49:00 Exp $
 */
@Entity
@Table(name = "bmp_user")
public class BmpUser implements Serializable {

    /** 主键 **/
    private Long id;

    /** 邮箱 **/
    private String email;

    /** 手机 **/
    private String mobile;
    
    /** 国际电话区号(见字典CALL_CODE) **/
    private String callCode;

    /** 密码 **/
    private String password;

    /** 是否启用(见字典YES_OR_NO) **/
    private String enabled;

    /** 密码是否过期(见字典YES_OR_NO) **/
    private String expired;

    /** 是否锁定(见字典YES_OR_NO) **/
    private String locked;

    /** 锁定时间 **/
    private Date lockTime;

    /**  **/
    private String headPath;

    /** 登录错误次数 **/
    private Long loginErrorCount;

    /** 最后修改密码时间 **/
    private Date lastPasswordReset;

    /** 创建时间 **/
    private Date createTime;

    /** 来源(见字典SOURCE) **/
    private String source;
    
    /** 语言环境 **/
    private String locale;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "email", length = 100)
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Column(name = "mobile", length = 11)
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    
    @Column(name = "call_code", length = 10)
    public String getCallCode() {
		return callCode;
	}

	public void setCallCode(String callCode) {
		this.callCode = callCode;
	}

	@Column(name = "password", length = 60)
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "enabled", length = 1)
    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    @Column(name = "expired", length = 1)
    public String getExpired() {
        return expired;
    }

    public void setExpired(String expired) {
        this.expired = expired;
    }

    @Column(name = "locked", length = 1)
    public String getLocked() {
        return locked;
    }

    public void setLocked(String locked) {
        this.locked = locked;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "lock_time")
    public Date getLockTime() {
        return lockTime;
    }

    public void setLockTime(Date lockTime) {
        this.lockTime = lockTime;
    }

    @Column(name = "head_path", length = 100)
    public String getHeadPath() {
        return headPath;
    }

    public void setHeadPath(String headPath) {
        this.headPath = headPath;
    }

    @Column(name = "login_error_count", length = 6)
    public Long getLoginErrorCount() {
        return loginErrorCount;
    }

    public void setLoginErrorCount(Long loginErrorCount) {
        this.loginErrorCount = loginErrorCount;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "last_password_reset")
    public Date getLastPasswordReset() {
        return lastPasswordReset;
    }

    public void setLastPasswordReset(Date lastPasswordReset) {
        this.lastPasswordReset = lastPasswordReset;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Column(name = "source", length = 2)
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Column(name = "locale", length = 20)
	public String getLocale() {
		return locale;
	}

	public void setLocale(String locale) {
		this.locale = locale;
	}

}
